package com.ruoyi.web.controller.durian;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.durian.service.LlCouponExchangeService;
import com.ruoyi.durian.service.LlOrderService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 个人中心控制器
 *
 * @author ruoyi
 */
@RestController
@RequestMapping("/person")
public class PerosnController {

    @Resource
    private LlCouponExchangeService llCouponExchangeService;

    /**
     * 券码兑换
     *
     * @param code 兑换码
     * @return
     */
    @PostMapping("/exchange")
    public AjaxResult exchange(String code) {
        return llCouponExchangeService.exchange(code);
    }

}
